package com.gxa.web.ServiceManagement;

import com.alibaba.fastjson.JSONObject;
import com.gxa.common.R;
import com.gxa.service.ServiceService;
import com.gxa.service.impl.ServiceServiceImp;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

//删除服务处理信息
@WebServlet("/service/delManagement")
public class DelServiceManagementServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //获取id值
        String id = request.getParameter("id");
        //调用HouseService
        ServiceService serviceService = new ServiceServiceImp();
        R r = serviceService.delManagementServiceById(id);
        //响应R
        response.setContentType("application/json;charset=utf-8");
        response.getWriter().write(JSONObject.toJSONString(r));
    }
}
